package org.jeecg.modules.basic.demo.school.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.basic.demo.school.entity.ImportSchool;
import org.jeecg.modules.basic.demo.school.entity.LwgyBaseSchool;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.exception.JeecgBootException;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.modules.basic.demo.school.entity.SchoolTreeModel;
import org.jeecg.modules.basic.demo.student.entity.LwgyBaseStudent;
import org.jeecg.modules.system.entity.SysUser;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @Description: lwgy_base_school
 * @Author: jeecg-boot
 * @Date:   2021-01-24
 * @Version: V1.0
 */
public interface ILwgyBaseSchoolService extends IService<LwgyBaseSchool> {

	/**根节点父ID的值*/
	public static final String ROOT_PID_VALUE = "0";
	
	/**树节点有子节点状态值*/
	public static final String HASCHILD = "1";
	
	/**树节点无子节点状态值*/
	public static final String NOCHILD = "0";

	/**新增节点*/
	//void addLwgyBaseSchool(LwgyBaseSchool lwgyBaseSchool);
	
	/**修改节点*/
	void updateLwgyBaseSchool(LwgyBaseSchool lwgyBaseSchool) throws JeecgBootException;
	
	/**删除节点*/
	void deleteLwgyBaseSchool(String id) throws JeecgBootException;

	/**查询所有数据，无分页*/
    List<LwgyBaseSchool> queryTreeListNoPage(QueryWrapper<LwgyBaseSchool> queryWrapper);

	List<SchoolTreeModel> queryTreeList();

	List<LwgyBaseSchool> selectClassList(LwgyBaseSchool lwgyBaseSchool);

    List<List<String>> rowToColumn(List<ImportSchool> list);

    ModelAndView customerExportXls(HttpServletRequest request, LwgyBaseSchool object, Class<ImportSchool> clazz, String title);

    List<LwgyBaseSchool> getTreeChild(String pid);

	//IPage<SysUser> queryUserByDepCode(Page<SysUser> page, String sysOrgCode, String realname);

	List<LwgyBaseSchool> getSchoolChildByPid(String pid);

    List<SysUser> getUserByUniversityCode(String universityCode);

	LwgyBaseSchool  getClassIdByName(LwgyBaseStudent lwgyBaseStudent);

	String getYearIdByName(LwgyBaseStudent lwgyBaseStudent);

	List<LwgyBaseSchool> getSclCampus();

    List<LwgyBaseSchool> getSysOrgCode();
}
